package com.share;

import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;

/**
 * created by caifan 2018/03/28
 */
public class ApolloSample {

    public static void main(String[] args) {
        Config config = ConfigService.getAppConfig();
        String bank = config.getProperty("bank","央行");
        String username = config.getProperty("jdbc.user.name","share");
        System.out.println(username);
        Config dbConfig = ConfigService.getConfig("development.db-config");
        String url = dbConfig.getProperty("jdbc.url", "localhost");
        System.out.println(url);

    }
}
